package com.example.common.enums;

public enum DType {
    cMedicine(1, "中医处方"),
    wMedicine(2, "西医处方"),
    cpMedicine(3, "中成药处方"),;

    private final Integer value;
    private final String description;

    DType(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    
    public Integer getName() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static String valueToDesc(Integer value) {
        if (value == 1L) {
            return cMedicine.getDescription();
        } else if (value == 2L) {
            return wMedicine.getDescription();
        }else if (value == 3L) {
            return cpMedicine.getDescription();
        }
        return null;
    }
}
